package com.rk.kbk.dao;

import com.rk.kbk.model.User;
import com.rk.kbk.model.UserLeave;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Date;
import java.util.List;

/**
 * Created by bilibili on 2017/3/18.
 */
public interface UserLeaveDao extends JpaRepository<UserLeave, Long>,JpaSpecificationExecutor {

    /**
     * 根据请假日期查询数据
     */
    List<UserLeave> findByLeaveDateInAndUser(List<Date> leaveDate,User user);
    /**
     * 根据请假状态查询数据
     */
    List<UserLeave> findByApprove(int approve);
}
